package com.ztools.common.model.pc.sys;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ztools.common.model.pc.BaseModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.Date;

/**
 * @Author:一口香菜
 * @Date: 2023/3/1  20:35
 * @Version 1.0
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("sys_file")
public class FileInfo extends BaseModel {

    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 文件名称
     */
    @TableField(value = "file_name")
    private String fileName;

    /**
     * 文件大小
     */
    @TableField(value = "file_size")
    private Long fileSize;

    /**
     * 文件类型
     */
    @TableField(value = "file_type")
    private String fileType;

    /**
     * 文件MD5值
     */
    @TableField(value = "file_md5")
    private String fileMd5;

    /**
     * 上传日期
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "upload_date")
    private Date uploadDate;

    /**
     * 文件访问地址
     */
    @TableField(value = "file_url")
    private String fileUrl;

    /**
     * 文件存储位置
     */
    @TableField(value = "file_location")
    private String fileLocation;
}
